# -*- coding: utf-8 -*-
"""
Created on Sat Sep 22 22:54:18 2018

@author: cheny
"""


# while 循环
benjin = 100000
year = 0
lilvll = 0.067

while benjin <= 200000:
    benjin = benjin + benjin * lilvll
    year += 1
    print("第{0}年拿了{1}元钱".format(year,benjin))
else:
    print("第{}年本金翻倍了".format(year))

#函数调用
def hello(name):
    print("{0},你好，我在向你打招呼".format(name))
    return "function end"

print(hello("zhangsan"))

#乘法表
def multi_form():
    for i in range(1,10):
        for j in range(1,i+1):
            print("{0}*{1}={2}".format(j, i, i*j), end = ' ')
        else:
            print("")    #默认换行


multi_form()















